package com.doudou.collection.orm.dto.user.reg;

import com.doudou.collection.utils.regex.RegexPatterns;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

import javax.validation.constraints.NotNull;
import javax.validation.constraints.Pattern;

/**
 * @ClassName UserRegDTO<br>
 * @Description 用户注册数据传输对象<br>
 * @Author 李浩文<br>
 * @Date 2023/6/2 17:44<br>
 * @Version 1.0<br>
 */
@Data
public class UserRegDTO {
    @NotNull
    @Pattern(regexp = RegexPatterns.USERNAME_REGEX, message = "用户名格式错误！")
    @ApiModelProperty(value = "用户名", required = true)
    private String username;

    @NotNull
    @Pattern(regexp = RegexPatterns.PASSWORD_REGEX, message = "密码格式错误！")
    @ApiModelProperty(value = "密码", required = true)
    private String password;
}
